Installing and Running IRIX on a Drive Other Than Drive 1
By Marc Romankewicz, Developer Technical Support

This article describes two techniques: installing IRIX on a disk drive other than the one configured as SCSI device 1, and booting from a disk drive other than the system disk. In addition, this article documents related features of the PROM monitor, sash, and the miniroot. 

You can apply these techniques to a number of situations that Silicon Graphics developers routinely encounter; for example, they are useful for

These situations typically arise at the time of a new operating system release, such as the upcoming release of IRIX 6.2. The procedures described in this article were tested on the following platforms:

However, the procedures should work on all ARCS-compliant SGI platforms, such as Indy, CHALLENGE, and Onyx. In addition, the procedures were tested on SCSI disks containing EFS filesystems.

You need to have CD-ROM or network access to the distribution that you want to install.

Caution: Be sure to back up your system before attempting to install any new system software. Backing up your system is particularly important because, if entered incorrectly, some of the commands described in this article could destroy data on the disks connected to your system.

Booting in the PROM Monitor

This section describes how to initiate the boot sequence differently from the way that the IRIS Software Installation Guide and the prom man page describe. Invoking the boot command tells the PROM monitor to load the standalone bootstrap program that the NVRAM variable OSLoader names from the location that the NVRAM variable SystemPartition determines. All remaining arguments are passed to the bootstrap program, except those beginning with a dash (-); to pass these arguments to the program, you need to precede them with another dash (--). For more direct control over the boot process, directly specify the path to both the standalone bootstrap program and the program that you want to boot.

For example, to boot IRIX on a default system configuration, you can substitute the following command for the boot unix command:

Although the examples used in this article apply to ARCS-compliant path and device names, you can still use the older, non-ARCS-compliant notation; for example, dksc(0,1,8)sash dksc(0,1,0)/unix. Refer to the prom(1m) man page for a complete description of both notations.

To use an ARCS sash from across the network (in case the sash in the system disk's volume header is corrupted or absent), use this command:

In this case, the PROM monitor attempts to retrieve sashARCS from the standalone environment file sa (described later in more detail), which in turn loads unix from the local system disk. Refer to the IRIS Software Installation Guide for the site preparations associated with bootp(); for example, you need to set the NVRAM variable netaddr to the correct value.

Use the following command to access the sash in the volume directory of an IRIX eoe CD (in a drive on SCSI ID 6):

Booting in the Sash

The boot sequence is almost the same for both the PROM monitor and the sash. The difference is that the PROM monitor knows only the information stored in the volume header of a disk; for example, the partition layout, contents of the volume directory, and the bootp() protocol. The sash, on the other hand, is able to access files located on an IRIX filesystem. As shown in the previous examples, you can specify the pathnames directly for more control of the boot process.

To run fx from an IRIX eoe CD, for instance, you can use the following command sequence:

>> disk(6)partition(8)sashARCS                in the PROM monitor, invoke
                                              sashARCS from the CD 
                                              volume header

sash: disk(6)partition(7)/stand/fx.ARCS -x    in the sash, invoke
                                              fx.ARCS from the CD file
                                              system with the -x option 
                                              (expert mode)

Loading the Miniroot

You can cause the sash to load the miniroot in one of two ways: by invoking the sash from the PROM monitor with the -m argument (as in sash -m or bootp()server:/dist/sa(sashARCS) -m), or by entering the install command in the sash. In both cases, the sash attempts to do the following:

Loading the Miniroot Manually

To gain greater flexibility in advanced installation situations, you can also perform the steps described in the previous section manually. These instructions apply to a default system configuration:

Obtaining mr

You can obtain mr from one of the following locations:

Installing IRIX on an Arbitrary Disk

You can modify the procedures described in the previous section to install IRIX on a disk drive with an arbitrary SCSI ID. For the following example the drive is configured as SCSI ID 2; the IRIX eoe distribution directory is located in server:/dist, and it needs to be accessible by bootp(). The disk drive has to have a valid partition layout, including a swap partition configured as partition 1, as is the case by default with system drives that Silicon Graphics delivers. The CPU type in this case is IP22.

To install IRIX on an arbitrary disk (drive 2 in this example), from the PROM monitor, do the following:

  1. Set the NVRAM variable OSLoadPartition to point to disk drive 2:

    setenv OSLoadPartition disk(2)partition(0)

  2. Set the variable tapedevice to the location of the standalone environment file:

    setenv tapedevice bootp()server:/dist/sa

  3. Invoke the sash with the load miniroot option.

    The sash can be loaded from the local system disk (sash -m) or from the sa file, as follows:

    bootp()server:/dist/sa(sashARCS) -m

    The sash now loads the miniroot and starts IRIX. Finally, one of the init scripts runs inst, and the root and swap partition for the miniroot kernel is automatically set to partition 1 of drive 2.

  4. Install IRIX.

    Refer to the IRIS Installation Guide for detailed instructions. If necessary, create new filesystems on the root and usr partitions as described in the "Tips, Tricks, and Advanced Features" section of the installation guide. After leaving inst, the miniroot attempts to reboot the system automatically, which may generate an error if the sash cannot find a valid IRIX kernel in OSLoadPartition.

You also need to set OSLoadPartition to its original value if you intend to continue booting from the system disk by default. Also, depending on the format of tapedevice, the miniroot may not be able to determine the distribution source automatically. In this case, use the from command in inst in order to select the source.

Booting IRIX from an Arbitrary Disk

As part of a successful IRIX installation, the files /dev/root and /dev/swap are automatically set to the correct values--partitions 0 and 1 of the installation disk--and the kernel is configured accordingly. Consequently, you cannot move the disk to another SCSI ID without taking special action, as described later in this section. Also, the appropriate sash is automatically placed in the volume directory of this disk during installation (this can also be done manually using dvhtool(1m) in the miniroot or after booting IRIX; for example, when you want to replace a corrupted sash in the volume header). You can then boot IRIX from this disk by using the following command from the PROM monitor:

If the second disk is supposed to act as the primary boot disk permanently, you can set SystemPartition and OSLoadPartition to point at this disk. Also, you can set these variables using the nvram command as part of a customized "reboot" shell script. Setting these variables lets you toggle between two different boot disks that could contain, for example, two different IRIX releases. A simple script to switch to a second disk might look like this (run this script as root; the first argument has to be the SCSI ID of the disk that you want to boot; and no error checking is performed):

Changing the SCSI ID of a Disk on Which IRIX is Already Installed

If you want to move the disk to a different SCSI ID, after installing IRIX, you need to direct the IRIX kernel to the new locations of the root and swap devices. If the disk becomes SCSI ID 3, the PROM commands are as follows:

or

    disk(3)partition(8)sash disk(3)partition(0)/unix root=dks0d3s0\
                                                 swap=/dev/dsk/dks0d3s1

Because root and swap are not NVRAM variables, you need to set them each time you boot the system. You must also specify the swap device's full pathname. To configure IRIX to the new SCSI ID permanently, boot IRIX, become root, and then issue the following commands from a shell window:

Shut down and restart the system. Now that the kernel is aware of the correct locations of the root and swap devices, you no longer have to specify root and swap on the boot command line, unless you change the disk's SCSI ID again.

You can easily move installed disks between systems with the same CPU and graphics configuration. However, a different configuration would require that you reinstall the parts of the operating system that are specific to the CPU and graphics type.

You can also find the information in this article in the upcoming Developer Toolbox CD, or in the following directory at the Developer Toolbox Web site:

This Web site requires a login ID and password, which are distributed only to members of the Developer Program. To find out how you can access this Web site, send an e-mail to devprogram@sgi.com.